<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function Calculator() {
        // this={}
        this.read = function (x, y) {
          this.v1 = x;
          this.v2 = y;
        };
        this.sum = function () {
          return this.v1 + this.v2;
        };
        this.mul = function () {
          return this.v1 * this.v2;
        };
      }
      const c = new Calculator();
      c.read(1, 2);
      console.log(c.sum());
      console.log(c.mul());
      console.log(c);
    </script>
  </body>
</html>
